home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1992-09-29 | 4.1 KB | 112 lines |
- '*******************************************************
- '* *
- '* AMOS Professional Procedure Library *
- '* *
- '* Procedure: Credits Scroller *
- '* *
- '* Author: Wai Hung Liu *
- '* *
- '*******************************************************
-
- ' ~~~~~~~~ EXAMPLE 1 ~~~~~~~~~~
- Screen Open 0,640,290,2,Hires : Curs Off : Hide
- Screen Display 0,,28,, : Palette $0,$FFF
- _CREDIT_SCR[0,8,1,1,1]
- ' ~~~~~~~~ EXAMPLE 2 ~~~~~~~~~~
- Screen Open 1,20,16,2,Laced+Lowres : Screen Display 1,,22,, : Curs Off
- Screen Open 0,640,290,2,Hires : Curs Off
- Screen Display 0,,28,, : Palette $0,$FFF
- _CREDIT_SCR[0,8,2,1,2]
- ' ~~~~~~~~ EXAMPLE 3 ~~~~~~~~~~
- Screen Open 0,320,290,2,Lowres : Curs Off
- Screen Display 0,,28,, : Palette $0,$FFF
- Get Rom Fonts
- Set Font 2 : Rem >> Sets Topaz 9 font <<
- _CREDIT_SCR[0,7,2,1,3]
- End
-
- Procedure _CREDIT_SCR[_CRSNO,_CRSFS,_CRSSPD,_CRSSTEP,_CRSDAT]
- '
- ' By placing different values into _CRSFS, you can also execute a
- ' primitive form of kerning. Seen in example 3 to make the text lines
- ' closer together.
- '
- Screen _CRSNO
- Def Scroll 1,0,0 To Screen Width,Screen Height,0,-_CRSSTEP
- Restore _CRSDAT+0
- '
- Do
- Read _CRSTXT$
- '
- If _CRSTXT$="*end*"
- For _CRSLOP=1 To Screen Height/_CRSSTEP
- Wait _CRSSPD
- Scroll 1
- Next _CRSLOP
- Exit
- End If
- '
- If _CRSTXT$<>"*end*"
- _CRSL=Text Length(_CRSTXT$)
- Text Screen Width/2-_CRSL/2,Screen Height-Text Base,_CRSTXT$
- For _CRSLOP=1 To(_CRSFS*2)/_CRSSTEP
- Wait _CRSSPD
- Scroll 1
- Next _CRSLOP
- End If
- Loop
- '
- '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ' ENTER ALL YOUR TEXT AS DATA STATEMENTS BELOW.
- '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- 1 Data "Welcome to...","","Credit Scroller!","By W.H.Liu",""
- Data "This is just an example of what can be achieved with AMOS"
- Data "Don't forget you can change the font as well!",""
- Data "Happy programming!","","This is similar to the scroller used"
- Data "In the game Double Dragon 2","and it looks good for a game"
- Data "intro!"
- Data "","Or you can use it for desktop video"
- Data "productions, credits to a home video"
- Data "perhaps, or for titling those films"
- Data "in your collection."
- Data "","Why not add some of your own music","and some flashy graphics"
- Data "to make a demo?","","Do what you want with this procedure"
- Data "and incorporate it into your own programs...","",""
- Data "There's more... please wait..."
- Data "*end*"
- '
- 2 Data "Ah yes... an interlace","scrolly version now."
- Data "","Parameters for the procedure are:"
- Data "_CRSNO = Screen"
- Data "_CRSFS = Font size"
- Data "_CRSSPD = Speed (delay - 1 fast, or any higher is slower)"
- Data "_CRSSTEP = Step rate of scroll"
- Data "_CRSDAT = Pointer to data label e.g. 1,2,3,etc."
- Data "","","","As you can see, AMOS allows you to"
- Data "have a rock steady display, even when"
- Data "in interlace which means that AMOS is"
- Data "ideal for your desktop video needs..."
- Data "There's one more example... hold on!"
- Data "*end*"
- '
- 3 Data "Now, we let you see an"
- Data "example of another font"
- Data "with this procedure."
- Data "","In interlace and in"
- Data "lowres, the font used"
- Data "is Topaz 9 but you can"
- Data "use your own font if"
- Data "you want to add that"
- Data "personal touch..."
- Data "","Some interesting ones"
- Data "to use might be Times 24"
- Data "or Opal/Diamond 15. Both"
- Data "are very good for home"
- Data "videos."
- Data "","","Credit Scroll proc"
- Data "","By Wai Hung Liu"
- Data "","for AMOS procs 1992."
- Data "*end*"
- '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ' NB: Always end your scroll data with "*end*".
- End Proc[A$]